{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![alt text](https://github.com/callysto/callysto-sample-notebooks/blob/master/notebooks/images/Callysto_Notebook-Banner_Top_06.06.18.jpg?raw=true)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Let's play the Frog Jumping game! \n",
    "### The YouTube video teaches us the rules of this game."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2MBERISGBUYLxoaL2NCOEJjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY//AABEIAWgB4AMBIgACEQEDEQH/xAAbAAEAAgMBAQAAAAAAAAAAAAAABQYBAwQHAv/EAEYQAAIBAwEDBwcKBAUEAwEAAAABAgMEERIFITETQVFVcZHRBhUXImGBlBQyNUJUgpKhsbIjUnLBNGJz4fEHJDPwQ0RTFv/EABkBAQADAQEAAAAAAAAAAAAAAAABAgQDBf/EACIRAQEAAwADAAIDAQEAAAAAAAABAgMREiExBBMiQVEy8P/aAAwDAQACEQMRAD8A8/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmScZOMk01uafMYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN17/ja/8AqS/U0m69/wAbX/1JfqaSJ8AAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN17/AI2v/qS/U0m69/xtf/Ul+ppInwAASAAAAAAAAAAAA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J0KlT+WLf5Gw1XUXO1rQXGUGvyAqf/TmHKbNvL2azWr3D1S6d2f1bO/y7t41/Je5lJJypOM4vo3pf3OL/AKbTT2BWhzwuJZXuRI+W01DyUvs/WjFL8SA7PJ2vK68n7CtN5nKjHL6XgkiI8lYOn5M7Pi+Lop9+8lwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADD4Mo3lr9Bz+5+5F5fBlG8tfoOf3P3ICQ2f/AI6h/Ui1HhUdp7QhJSjfXKkuDVWW78zd592x1rffET8SIPbweIefdsda33xE/Eefdsda33xE/Eke3g8Q8+7Y61vviJ+I8+7Y61vviJ+IHt4PEPPu2Otb74ifiPPu2Otb74ifiB7eDxDz7tjrW++In4jz7tjrW++In4ge3g8Q8+7Y61vviJ+I8+7Y61vviJ+IHt5g8R8+7Y61vviJ+I8+7Y61vviJ+IF7nZbW8mNrXV1suzd/YXT1yoxeJQfs7+hmu7htzytlRtbjZ0tmWEZqVV1JPVLHRlL9Ckefdsda33xE/Eefdsda33xE/ED2ylTjRpQpU1iEEoxXQkfZ4h592x1rffET8R592x1rffET8QPbweIefdsda33xE/Eefdsda33xE/ED28HiHn3bHWt98RPxHn3bHWt98RPxA9vB4h592x1rffET8R592x1rffET8QPbweIefdsda33xE/Eefdsda33xE/ED28HiHn3bHWt98RPxHn3bHWt98RPxA9vB4h592x1rffET8R592x1rffET8QPbweIefdsda33xE/Eefdsda33xE/ED28HiHn3bHWt98RPxHn3bHWt98RPxA9vB4h592x1rffET8R592x1rffET8QPbweIefdsda33xE/Eefdsda33xE/ED28HiHn3bHWt98RPxHn3bHWt98RPxA9vB4h592x1rffET8R592x1rffET8QPbweIefdsda33xE/Eefdsda33xE/ED28HiHn3bHWt98RPxHn3bHWt98RPxA9vB4h592x1rffET8R592x1rffET8QPbweIefdsda33xE/Eefdsda33xE/ED28HiHn3bHWt98RPxHn3bHWt98RPxA9vB4h592x1rffET8R592x1rffET8QPbweIefdsda33xE/Eefdsda33xE/ED28HiHn3bHWt98RPxHn3bHWt98RPxA9ufBlG8tfoOf3P3IpXn3a/Wt98RPxNFfaF7cQ0V7y4qw/lnUcl+YHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/2Q==\n",
      "text/html": [
       "\n",
       "        <iframe\n",
       "            width=\"400\"\n",
       "            height=\"300\"\n",
       "            src=\"https://www.youtube.com/embed/R8wkhae4Pvg\"\n",
       "            frameborder=\"0\"\n",
       "            allowfullscreen\n",
       "        ></iframe>\n",
       "        "
      ],
      "text/plain": [
       "<IPython.lib.display.YouTubeVideo at 0x7fa060b38278>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Import Youtube Video\n",
    "from IPython.display import YouTubeVideo\n",
    "YouTubeVideo('R8wkhae4Pvg')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Now you play the Frog Jumping game!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<link rel=\"stylesheet\" href=\"style.css\">\n",
       "    <div class=\"frogNum\">\n",
       "        <label for=\"frogs\"><strong>Choose number of frogs: </strong></label>\n",
       "        <select name=\"frogs\" id=\"frogNumberSelector\">\n",
       "            <option value=\"2\" selected>4 Frogs</option>\n",
       "            <option value=\"3\">6 Frogs</option>\n",
       "            <option value=\"4\">8 Frogs</option>\n",
       "        </select>\n",
       "    </div>\n",
       "    <div class=\"mainGrid\">\n",
       "        <ul id=\"frogList\" class=\"frogGrid\">\n",
       "            <li class=\"btns\" onclick=\"resetFrogs()\"><span>Reset</span></li>\n",
       "            <li class=\"btns\" onclick=\"undo()\"><span>Undo</span></li>\n",
       "            <li class=\"counter\">Your moves: <span id=\"counter\">0</span></li>\n",
       "        </ul>\n",
       "    </div>\n",
       "    \n",
       "        <div>\n",
       "        <table id=\"moveTable\">\n",
       "            <tr>\n",
       "                <th>Step Number</th>\n",
       "                <th>Current Position</th>\n",
       "                <th>Move</th>\n",
       "            </tr>\n",
       "        </table>\n",
       "    </div>\n",
       "\n",
       "    <script src=\"https://code.jquery.com/jquery-3.3.1.slim.min.js\" integrity=\"sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E=\"\n",
       "        crossorigin=\"anonymous\"></script>\n",
       "    <script src=\"main.js\"></script>\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%html\n",
    "<link rel=\"stylesheet\" href=\"style.css\">\n",
    "    <div class=\"frogNum\">\n",
    "        <label for=\"frogs\"><strong>Choose number of frogs: </strong></label>\n",
    "        <select name=\"frogs\" id=\"frogNumberSelector\">\n",
    "            <option value=\"2\" selected>4 Frogs</option>\n",
    "            <option value=\"3\">6 Frogs</option>\n",
    "            <option value=\"4\">8 Frogs</option>\n",
    "        </select>\n",
    "    </div>\n",
    "    <div class=\"mainGrid\">\n",
    "        <ul id=\"frogList\" class=\"frogGrid\">\n",
    "            <li class=\"btns\" onclick=\"resetFrogs()\"><span>Reset</span></li>\n",
    "            <li class=\"btns\" onclick=\"undo()\"><span>Undo</span></li>\n",
    "            <li class=\"counter\">Your moves: <span id=\"counter\">0</span></li>\n",
    "        </ul>\n",
    "    </div>\n",
    "    \n",
    "        <div>\n",
    "        <table id=\"moveTable\">\n",
    "            <tr>\n",
    "                <th>Step Number</th>\n",
    "                <th>Current Position</th>\n",
    "                <th>Move</th>\n",
    "            </tr>\n",
    "        </table>\n",
    "    </div>\n",
    "\n",
    "    <script src=\"https://code.jquery.com/jquery-3.3.1.slim.min.js\" integrity=\"sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E=\"\n",
    "        crossorigin=\"anonymous\"></script>\n",
    "    <script src=\"main.js\"></script>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Below is the code that takes YOUR move sequence, and applies it to the starting position\n",
    "### Feel free to ignore this :-)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def play_game(starting_position, move_sequence):\n",
    "    \n",
    "    Alist=[]\n",
    "    Blist=[]\n",
    "    Empty=0\n",
    "    totalmoves=0\n",
    "    counter=0\n",
    "    flag=0\n",
    "\n",
    "    for i in range(0,len(starting_position)):\n",
    "        if starting_position[i]=='A':\n",
    "            counter+=1\n",
    "            Alist.append(counter)\n",
    "        if starting_position[i]=='B':\n",
    "            counter+=1\n",
    "            Blist.append(counter)\n",
    "        if starting_position[i]=='_':\n",
    "            counter+=1\n",
    "            Empty=counter\n",
    "\n",
    "    startAlist=list.copy(Alist)\n",
    "    startBlist=list.copy(Blist)\n",
    "    startEmpty=Empty\n",
    "\n",
    "    for i in range(0,len(move_sequence)):\n",
    "        if move_sequence[i]=='A':\n",
    "            totalmoves+=1\n",
    "            print(\"\")\n",
    "            if Empty-1 in Alist:\n",
    "                Alist.remove(Empty-1)\n",
    "                Alist.append(Empty)\n",
    "                Empty=Empty-1\n",
    "            elif Empty-2 in Alist and Empty-1 in Blist:\n",
    "                Alist.remove(Empty-2)\n",
    "                Alist.append(Empty)\n",
    "                Empty=Empty-2\n",
    "            else:\n",
    "                print(\"\")\n",
    "                print(\"ERROR: sorry you made a mistake after\", totalmoves, \"total moves\")\n",
    "                flag=1\n",
    "                break\n",
    "        if move_sequence[i]=='B': \n",
    "            totalmoves+=1\n",
    "            print(\"\")\n",
    "            if Empty+1 in Blist:\n",
    "                Blist.remove(Empty+1)\n",
    "                Blist.append(Empty)\n",
    "                Empty=Empty+1\n",
    "            elif Empty+2 in Blist and Empty+1 in Alist:\n",
    "                Blist.remove(Empty+2)\n",
    "                Blist.append(Empty)\n",
    "                Empty=Empty+2\n",
    "            else:\n",
    "                print(\"\")\n",
    "                print(\"ERROR: sorry you made a mistake after\", totalmoves, \"total moves\")\n",
    "                flag=1\n",
    "                break\n",
    "\n",
    "        if move_sequence[i]=='A' or move_sequence[i]=='B':\n",
    "            for j in range(0,counter+1):\n",
    "                if j in Alist: print(\"A \", end = \" \") \n",
    "                elif j in Blist: print(\"B \", end = \" \")\n",
    "                elif j == Empty: print(\"_ \", end = \" \") \n",
    "                else: print(\"\", end = \" \")\n",
    "            print(\"\")\n",
    "    \n",
    "    print(\"\")\n",
    "    \n",
    "    startAlist.sort()\n",
    "    startBlist.sort()\n",
    "    Alist.sort()\n",
    "    Blist.sort()\n",
    "    \n",
    "    if flag==0:\n",
    "        if startAlist==Blist and startBlist==Alist and startEmpty==Empty:\n",
    "            print(\"Congratulations! You have solved the problem in\", totalmoves, \"total moves\")\n",
    "        else:\n",
    "            print(\"You have currently made\", totalmoves, \"total moves.  Keep going!\")\n",
    "        \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Input your STARTING POSITION below, with team names A and B\n",
    "### For example, with four people on each team, write down AAAA _ BBBB"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "starting_position = 'AA_BB'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Now input your MOVE SEQUENCE, to try to solve the game\n",
    "### For example, with two people on each team, one solution is A BB AA BB A"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "move_sequence = 'A BB AA BB A '"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " A  _  A  B  B  \n",
      "\n",
      " A  B  A  _  B  \n",
      "\n",
      " A  B  A  B  _  \n",
      "\n",
      " A  B  _  B  A  \n",
      "\n",
      " _  B  A  B  A  \n",
      "\n",
      " B  _  A  B  A  \n",
      "\n",
      " B  B  A  _  A  \n",
      "\n",
      " B  B  _  A  A  \n",
      "\n",
      "Congratulations! You have solved the problem in 8 total moves\n"
     ]
    }
   ],
   "source": [
    "play_game(starting_position, move_sequence)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![alt text](https://github.com/callysto/callysto-sample-notebooks/blob/master/notebooks/images/Callysto_Notebook-Banners_Bottom_06.06.18.jpg?raw=true)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
